package com.starlink.model.util;

import com.starlink.model.dtomapper.MallRefundArticlesDtoMapper;
import com.starlink.model.domain.MallRefundArticlesDO;
import com.starlink.model.vo.MallRefundArticlesVO;
import com.google.common.collect.Lists;
import org.apache.commons.collections4.CollectionUtils;

import java.util.ArrayList;
import java.util.List;

/**
 * @author zhanghong
 */
public class MallRefundArticlesConvert {

    public static List<MallRefundArticlesVO> buildMallRefundArticlesVoList(List<MallRefundArticlesDO> mallRefundArticlesDOList) {
        if (CollectionUtils.isEmpty(mallRefundArticlesDOList)) {
            return Lists.newArrayList();
        }
        List<MallRefundArticlesVO> mallRefundArticlesVOList = new ArrayList<>();
        for (MallRefundArticlesDO mallRefundArticlesDO : mallRefundArticlesDOList) {
            mallRefundArticlesVOList.add(MallRefundArticlesDtoMapper.INSTANCE.do2VO(mallRefundArticlesDO));
        }

        return mallRefundArticlesVOList;
    }
}
